package com.woniu.util;

//返回状态码的枚举：会被翻译成静态常量

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ResEnum {
    SUCCESS(200,"OK"),
    FAIL(2000,"FAIL"),
    LOGIN_ERROR(2001,"用户名或密码错误"),
    NO_LOGIN(2002,"no login！"),
    NO_BOOK_COUNT(2003,"库存不足！"),
    FOOD_HAS_CANCELED(2004,"订单超时已取消！"),
    FOOD_HAS_PAYED(2004,"订单已支付！")
    ;

    private Integer code;
    private String msg;

    public static void main(String[] args) {
        System.out.println(ResEnum.SUCCESS);
        System.out.println(ResEnum.SUCCESS.code);
    }
}
